/**************************************************************************************************
|
| MediaMAX - Media Sharing Script
| http://www.isoftscripts.com
| sales@isoftscripts.com
| Version: 1.3.5
|
|**************************************************************************************************
|
| By using this software you agree that you have read and acknowledged our End-User License 
| Agreement available at http://www.isoftscripts.com/mediamax-eula.html and to be bound by it.
|
| Copyright (c) 2008 iSoftScripts.com. All rights reserved.
|**************************************************************************************************/

Upgrade Instructions - v1.3.4 to v1.3.5


1. Open myvideos.php
Find:
	$query1 = "SELECT count(*) as total from videos where public='1' AND active='1' AND USERID='$_SESSION[USERID]' order by VIDEOID $sort limit $config[maximum_results]";
	$query2 = "SELECT * from videos where public='1' AND active='1' AND USERID='$_SESSION[USERID]' order by VIDEOID $sort limit $pagingstart, $config[items_per_page]";

Replace With:
	$query1 = "SELECT count(*) as total from videos where active='1' AND USERID='$_SESSION[USERID]' order by VIDEOID $sort limit $config[maximum_results]";
	$query2 = "SELECT * from videos where active='1' AND USERID='$_SESSION[USERID]' order by VIDEOID $sort limit $pagingstart, $config[items_per_page]";


2. Open include/functions/main.php
Find:
?>

Add Above:
function insert_get_member_pp_videos_count($var)
{
        global $conn;
        $query="SELECT count(*) as total FROM videos WHERE USERID='".mysql_real_escape_string($var[USERID])."' AND active='1'";
        $executequery=$conn->execute($query);
        $results = $executequery->fields[total];
		echo "$results";
}


3. Open themes/account.tpl
Find:
{insert name=get_member_videos_count value=var USERID=$userinfo[0].USERID}

Replace With:
{insert name=get_member_pp_videos_count value=var USERID=$userinfo[0].USERID}